Skip to content

New ProviderFactory interface#11111

Open
fulghum wants to merge 2 commits into
mainfrom
fulghum/relation_name_validation
Open

New ProviderFactory interface#11111
fulghum wants to merge 2 commits into
mainfrom
fulghum/relation_name_validation

Conversation

@fulghum
Copy link
Copy Markdown
Contributor

@fulghum fulghum commented May 28, 2026

Introduces a new ProviderFactory interface that allows Doltgres to extend database behavior.

Depends on: dolthub/go-mysql-server#3563

@fulghum fulghum force-pushed the fulghum/relation_name_validation branch 2 times, most recently from 6bd7d2b to 9b1b5b5 Compare May 28, 2026 00:43
@coffeegoddd
Copy link
Copy Markdown
Contributor

coffeegoddd commented May 28, 2026

@fulghum DOLT

read_tests from_latency to_latency percent_change
covering_index_scan 2.3 2.3 0.0
groupby_scan 134.9 134.9 0.0
index_join 1.93 1.93 0.0
index_join_scan 1.34 1.34 0.0
index_scan 211.6 211.6 0.0
oltp_point_select 0.26 0.26 0.0
oltp_read_only 5.09 5.09 0.0
select_random_points 0.55 0.55 0.0
select_random_ranges 0.64 0.67 4.69
table_scan 200.47 204.11 1.82
types_table_scan 458.96 475.79 3.67
write_tests from_latency to_latency percent_change
oltp_delete_insert 6.21 6.21 0.0
oltp_insert 3.13 3.13 0.0
oltp_read_write 11.45 11.45 0.0
oltp_update_index 3.3 3.3 0.0
oltp_update_non_index 3.02 3.02 0.0
oltp_write_only 6.32 6.32 0.0
types_delete_insert 6.91 6.79 -1.74

@coffeegoddd
Copy link
Copy Markdown
Contributor

coffeegoddd commented May 28, 2026

@fulghum DOLT

test_name from_latency_p95 to_latency_p95 percent_change
tpcc-scale-factor-1 45.79 45.79 0.0
test_name from_server_name from_server_version from_tps to_server_name to_server_version to_tps percent_change
tpcc-scale-factor-1 dolt 82e98ff 52.25 dolt 4057ea3 53.34 2.09

@coffeegoddd
Copy link
Copy Markdown
Contributor

@fulghum DOLT

comparing_percentages
100.000000 to 100.000000
version result total
9b1b5b5 ok 5937471
version total_tests
9b1b5b5 5937471
correctness_percentage
100.0

@fulghum fulghum force-pushed the fulghum/relation_name_validation branch from 9b1b5b5 to 9128243 Compare May 29, 2026 19:40
@fulghum fulghum force-pushed the fulghum/relation_name_validation branch from 9128243 to 62651cf Compare May 29, 2026 20:20
@fulghum fulghum force-pushed the fulghum/relation_name_validation branch from 62651cf to 4057ea3 Compare May 29, 2026 20:52
@coffeegoddd
Copy link
Copy Markdown
Contributor

@fulghum DOLT

comparing_percentages
100.000000 to 100.000000
version result total
4057ea3 ok 5937471
version total_tests
4057ea3 5937471
correctness_percentage
100.0

@fulghum fulghum marked this pull request as ready for review May 29, 2026 21:39
Copy link
Copy Markdown
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General idea seems very workable

// TODO: This is currently used by Doltgres to wrap databases, but we should be able
// to completely remove this in a future refactoring if Doltgres overrides
// GetTableInsensitive().
SchemaWrap func(requestedName string, db Database) sql.DatabaseSchema
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment on doltgres PR


pro.InitDatabaseHooks = append(pro.InitDatabaseHooks, statspro.NewInitDatabaseHook(sc))
pro.DropDatabaseHooks = append(pro.DropDatabaseHooks, statspro.NewDropDatabaseHook(sc))
if adder, ok := se.GetUnderlyingEngine().Analyzer.Catalog.DbProvider.(interface {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want a named interface for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants